﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ATM
{
    class AtmModel
    {
        public string cardNumb;
        public string pin;
        public static int balance=10000;
        public bool login(string cardNumb, string pin)
        {   double cardNumber = Convert.ToDouble(cardNumb);
            double pincode = Convert.ToDouble(pin);
            if (cardNumber % 10000 == pincode)
            {
                return true;
            }
            else
            {
                return false; 
            }
        }
        public void logout()
        {
            
        }
        public int getBalance()
        {
            return balance;
        }
        public bool takeCash(int amount)
        {
            if (balance > amount)
            {
                balance = balance - amount;
                return true;
            }
            else
            {
                return false;
            }
        }
    
    }
}
